#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([capture], [0.1], [admin@ntcmd.net])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(build-aux)
m4_include([m4/acinclude.m4])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_SRCDIR([src/main.c])
#AC_CONFIG_HEADERS([src/config.h])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE(capture, 0.1)
AM_CONFIG_HEADER([src/config.h])

# Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB

AM_PROG_CC_C_O
AM_PROG_LIBTOOL

AC_ENABLE_STATIC
AC_DISABLE_SHARED
LT_INIT

# Checks for libraries.
AC_CHECK_LIB([pcap], [main])

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
AC_CHECK_HEADERS([pcap/pcap.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL

# Checks for library functions.
AC_FUNC_MMAP
AC_CHECK_FUNCS([munmap socket memset])

AC_CONFIG_FILES([Makefile
                 src/Makefile])
AC_OUTPUT
